#ifndef  FRAME_UTIL_H
#define  FRAME_UTIL_H

#include <atomic>

namespace frame {

class UniqueNumber{
public:
    UniqueNumber()
    :number(0)
    {
    }
    ~UniqueNumber(){};

    uint64_t current() const {
        return number.load();
    }
    uint64_t next(){
        return number.fetch_add(1);
    }
private:
    std::atomic<uint64_t> number;
};

} //end of namespace  frame
#endif   /* FRAME_UTIL_H */
